package com.shensi.api.pay.client;

import com.shensi.api.pay.param.request.PayOrderRequest;
import com.shensi.api.pay.pojo.vo.PayOrderVO;
import com.shensi.api.pay.pojo.vo.StoredCardVO;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.api.pay.param.ResultData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 会员列表消费扣减controller
 *
 * @date 2023/10/16
 */
@Api(tags = {"消费扣款"})
@FeignClient(name = CloudConstant.PAY_SERVER, path = "appUser/order")
public interface AppUserOrderClient {

    @PostMapping("create")
    @ApiOperation("创建订单")
    ResultData<PayOrderVO> createOrder(@RequestBody PayOrderRequest request);

    @PostMapping("update")
    @ApiOperation("更新订单")
    ResultData<PayOrderVO> updateOrder(@RequestBody PayOrderRequest request);


    @PostMapping("pay")
    @ApiOperation("支付")
    ResultData pay(@RequestBody PayOrderRequest request);

    @PostMapping("cardList")
    @ApiOperation("储值卡列表")
    ResultData<List<StoredCardVO>> queryStoredCardVOList(@RequestBody PayOrderRequest request);


}
